import request from '@/utils/request'

// 查询考试科目分页列表
export const subjectpage = (query) => {
    return request({
        url: '/system/exam/subject/page',
        method: 'get',
        params: query
    })
}

// 新增考试科目
export const subjectAdd = (query) => {
    return request({
        url: '/system/exam/subject',
        method: 'post',
        data: query
    })
}

// 修改考试科目
export const subjectEdit = (query) => {
    return request({
        url: '/system/exam/subject',
        method: 'put',
        data: query
    })
}

// 删除考试科目
export const subjectDel = (query) => {
    return request({
        url: '/system/exam/subject/' + query,
        method: 'delete'
    })
}
// 根据学校ID获取成绩查询权限配置
export const gradeQueryPermissionConfig = (query) => {
    return request({
        url: '/analysis/gradeQueryPermissionConfig/exam/' + query,
        method: 'get'
    })
}
// 新增成绩查询权限配置
export const gradeQueryPermissionConfigUpdata = (query) => {
    return request({
        url: '/analysis/gradeQueryPermissionConfig/global/update',
        method: 'put',
        data: query
    })
}
// 修改成绩查询权限配置
export const gradeQueryPermissionConfigEdit = (query) => {
    return request({
        url: '/analysis/gradeQueryPermissionConfig/global',
        method: 'put',
        data: query
    })
}
// 获取学校查询权限配置
export const schoolGradeQueryPermissionConfig = (query) => {
    return request({
        url: '/analysis/gradeQueryPermissionConfig/school/exam/' + query.examId + '/school/' + query.schoolId,
        method: 'get'
    })
}
// 修改学校查询权限配置
export const schoolGradeQueryPermissionConfigEdit = (query) => {
    return request({
        url: '/analysis/gradeQueryPermissionConfig/school/save',
        method: 'post',
        data: query
    })
}
